package com.globalwave.rule.engine.example;

import com.globalwave.rule.engine.RuleBase;
import com.globalwave.rule.engine.WorkingMemory;
import com.globalwave.test.BaseTestCase;

public class HelloWorld extends BaseTestCase {

	public void say() throws Exception {
		RuleBase ruleBase = new RuleBase(); 
        WorkingMemory workingMemory = ruleBase.newStatefulSession(); 
        
       //go ! 
        Message message = new Message(); 
        message.setMessage(  "Hello World" ); 
        //message.setStatus( Message.HELLO ); 
        message.setStatus( "M" ); 
        workingMemory.insert( message ); 
        workingMemory.fireAllRules();    
	}
	
	
	class Message {
		private String message ;
		private String status ;
		public String getMessage() {
			return message;
		}
		public void setMessage(String message) {
			this.message = message;
		}
		public String getStatus() {
			return status;
		}
		public void setStatus(String status) {
			this.status = status;
		}
		
	}
}
